{extend name="public/layout" /}
{block name="link"}
<link rel="stylesheet" href="__STATIC__/frame/layui/css/layui.css">
<link rel="stylesheet" href="__HOME_LAYUI__/css/layui.css">
<link rel="stylesheet" href="__STATIC__/frame/static/css/style.css">
{/block}
{block name="script"}
{/block}
{block name="main"}
<div class="layui-layout layui-layout-admin"> <!-- 添加skin-1类可手动修改主题为纯白，添加skin-2类可手动修改主题为蓝白 -->
    <!-- header -->
    <div class="layui-header my-header">
        <a href="{:url('index/index')}">
            <!--<img class="my-header-logo" src="" alt="logo">-->
            <div class="my-header-logo">{:getSysTem('web_name')}</div>
            <img src="{:getSysTem('logo',false,true)}" height="40"/>
        </a>
        <div class="my-header-btn">
            <button class="layui-btn layui-btn-small btn-nav"><i class="layui-icon">&#xe65f;</i></button>
        </div>
        <!-- 顶部右侧添加选项卡监听 -->
        <ul class="layui-nav my-header-user-nav" lay-filter="side-top-right">
            <li class="layui-nav-item">
                <a class="name" href="javascript:;"><i class="layui-icon">&#xe629;</i>主题</a>
                <dl class="layui-nav-child">
                    <dd data-skin="0"><a href="javascript:;">默认</a></dd>
                    <dd data-skin="1"><a href="javascript:;">纯白</a></dd>
                    <dd data-skin="2"><a href="javascript:;">蓝白</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a class="name" href="javascript:;">
                    <img src="{:getFilePath($user['portrait'])}" alt="logo" style="border-radius: 50%">
                    {if $user['nickname']}{$user['nickname']}{else}{$user['user']}{/if}</a>
                <dl class="layui-nav-child">
                    <dd><a href="{:url('index/signin')}"><i class="layui-icon">&#xe621;</i>登录页</a></dd>
                    <dd><a href="javascript:;" href-url="{:url('adminuser/show_edit')}?id={$user['id']}"><i class="layui-icon">&#xe621;</i>个人信息</a></dd>
                    <dd><a href="{:url('index/out')}"><i class="layui-icon">&#x1006;</i>退出</a></dd>
                </dl>
            </li>
        </ul>

    </div>
    <!-- side -->
    <div class="layui-side my-side">
        <div class="layui-side-scroll">
            <!-- 左侧主菜单添加选项卡监听 -->
            <ul class="layui-nav layui-nav-tree" lay-filter="side-main">
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe631;</i>基础管理</a>
                    <dl class="layui-nav-child">
                        {if config('developer')}
                        <dd><a href="javascript:;" href-url="{:url('model/show_list')}"><i class="layui-icon">&#xe649;</i>模型管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('mokuai/show_list')}"><i class="layui-icon">&#xe649;</i>模块管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('column/show_list')}"><i class="layui-icon">&#xe649;</i>栏目管理</a></dd>
                        {/if}
                        <dd><a href="javascript:;" href-url="{:url('enclosure/show_list')}"><i class="layui-icon">&#xe649;</i>附件管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('keywords/show_list')}"><i class="layui-icon">&#xe649;</i>关键词管理</a></dd>
                        <!--<dd><a href="javascript:;" href-url="{:url('Huisou/dshow_list')}"><i class="layui-icon">&#xe649;</i>内容回收站</a></dd>-->
                        <dd><a href="javascript:;" href-url="{:url('Huisou/lshow_list')}"><i class="layui-icon">&#xe649;</i>回收站</a></dd>
                    </dl>
                </li>
                {if $mokuai}
                {foreach mokuai as $mok}
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe68e;</i>{$mok['name']}内容管理</a>
                    <dl class="layui-nav-child">
                        {foreach $mok['column'] as $value}
                        <dd>
                            <a href="javascript:;" onclick="tuozhan(this,0)" {if $value['status']}href-url="{:url($value['action'])}?cid={$value['id']}"{/if}><i class="layui-icon">&#xe649;</i>{$value['name']}</a>
                        </dd>
                        {if $value['xia']}
                        <dl class="layui-nav-child" style="display: none">
                            {foreach $value['xia'] as $v}
                            <dd>
                                <a href="javascript:;" onclick="tuozhan(this,0)" {if !$v['xia']}style="margin-left: 20px"{/if} {if $v['status']}href-url="{:url($v['action'])}?cid={$v['id']}"{/if}>{php}echo str_repeat('&nbsp;&nbsp;',$v['cheng']);{/php}{if $v['xia']}<i class="layui-icon">&#xe671;</i>{/if}{$v['name']}</a>
                            </dd>
                            {if $v['xia']}
                            <dl class="layui-nav-child" style="display: none">
                                {foreach $v['xia'] as $va}
                                <dd>
                                    <a href="javascript:;" style="margin-left: 40px" {if $value['status']}href-url="{:url($va['action'])}?cid={$va['id']}"{/if}>{php}echo str_repeat('&nbsp;&nbsp;',$va['cheng']);{/php}{$va['name']}</a>
                                </dd>
                                {/foreach}
                            </dl>
                            {/if}
                            {/foreach}
                        </dl>
                        {/if}
                        {/foreach}
                    </dl>
                </li>
                {/foreach}
                {/if}
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe628;</i>联表管理</a>
                    <dl class="layui-nav-child">
                        {foreach $lianbiao as $value}
                        <dd><a href="javascript:;" href-url="{:url('lianbiao/show_list')}?model_id={$value['id']}"><i class="layui-icon">&#xe649;</i>{$value['model_name']}</a></dd>
                        {/foreach}
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe674;</i>后台用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="{:url('adminuser/show_list')}"><i class="layui-icon">&#xe649;</i>用户管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('roles/show_list')}"><i class="layui-icon">&#xe649;</i>角色管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('jur/show_list')}"><i class="layui-icon">&#xe649;</i>权限管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe66f;</i>用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="{:url('users/show_list')}"><i class="layui-icon">&#xe649;</i>用户</a></dd>
                        <!--<dd><a href="javascript:;" href-url="<{:url('systems/show_list')}>"><i class="layui-icon">&#xe649;</i>添加配置</a></dd>-->
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe614;</i>系统管理</a>
                    <dl class="layui-nav-child">
                        <!--<dd><a href="javascript:;" href-url="<{:url('systems/show_edit')}>"><i class="layui-icon">&#xe649;</i>更改配置</a></dd>-->
                        <dd><a href="javascript:;" href-url="{:url('systems/show_list')}"><i class="layui-icon">&#xe649;</i>配置管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('qiniu/show_list')}"><i class="layui-icon">&#xe649;</i>七牛云管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('wechats/show_list')}"><i class="layui-icon">&#xe649;</i>微信管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe628;</i>数据库备份管理</a>
                    <dl class="layui-nav-child">
                        <!--<dd><a href="javascript:;" href-url="<{:url('systems/show_edit')}>"><i class="layui-icon">&#xe649;</i>更改配置</a></dd>-->
                        <dd><a href="javascript:;" href-url="{:url('databassystem/show_add')}"><i class="layui-icon">&#xe649;</i>数据库备份配置管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('databases/show_list')}"><i class="layui-icon">&#xe649;</i>数据库备份管理</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <!-- body -->
    <div class="layui-body my-body">
        <div class="layui-tab layui-tab-card my-tab" lay-filter="card" lay-allowClose="true">
            <ul class="layui-tab-title">
                <li class="layui-this" lay-id="1"><span><i class="layui-icon">&#xe638;</i>欢迎页</span></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe id="iframe" src="{:url('index/welcome')}" frameborder="0"></iframe>
                </div>
            </div>
        </div>
    </div>
    <!-- footer -->
    <div class="layui-footer my-footer">

    </div>
</div>
{/block}
{block name="footer"}
<script type="text/javascript" src="__STATIC__/frame/layui/layui.js"></script>
<script type="text/javascript" src="__HOME_JS__/jquery.3.3.1.min.js"></script>
<script type="text/javascript" src="__STATIC__/frame/static/js/vip_comm.js"></script>
{/block}
{block name='javascript'}
<script type="text/javascript">
    layui.use(['layer','vip_nav'], function () {

        // 操作对象
        var layer       = layui.layer
            ,vipNav     = layui.vip_nav
            ,$          = layui.jquery;

        // 顶部左侧菜单生成 [请求地址,过滤ID,是否展开,携带参数]
        vipNav.top_left('./json/nav_top_left.json','side-top-left',false);
        // 主体菜单生成 [请求地址,过滤ID,是否展开,携带参数]
        vipNav.main('./json/nav_main.json','side-main',true);

        // you code ...


    });
    function tuozhan(obj,num) {
        var nex = $(obj).parent('dd').next('dl');
        if(num==0){
            nex.show();
            $(obj).attr('onclick','tuozhan(this,1)')
        }else {
            nex.hide();
            $(obj).attr('onclick','tuozhan(this,0)')
        }
    }
     $.post("{:url('index/zidongbeifen')}",{id:1},function (res) {
         console.log(res)
     })
     setInterval(function () {
         $.post("{:url('index/zidongbeifen')}",{id:1},function (res) {
             console.log(res)
         })
     },3600*1000);
</script>
{/block}